package org.example.system;

import org.example.model.MachineState.IdleState;
import org.example.model.MachineState.WorkingState;

public class Sprayer extends FarmMachine {
    public Sprayer(String id) {
        super(id);
        System.out.println("创建喷药机: " + id);
    }

    public void startTask(String task) {
        setState(new WorkingState());
        System.out.println("开始喷药作业: " + task);
    }

    public void stopTask() {
        setState(new IdleState());
        System.out.println("停止喷药作业");
    }
}